home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / isboolean.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  790 b   |  44 lines

  1. <!--- This example shows the use of IsBoolean --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. IsBoolean Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  12. <BODY  bgcolor="#FFFFD5">
  13.  
  14. <H3>IsBoolean Example</H3>
  15.  
  16. <CFIF IsDefined("form.theTestValue")>
  17.  
  18.     <CFIF IsBoolean(form.theTestValue)>
  19.     <H3>The expression <CFOUTPUT>#DE(form.theTestValue)#</CFOUTPUT> is Boolean</H3>
  20.     <CFELSE>
  21.     <H3>The expression <CFOUTPUT>#DE(form.theTestValue)#</CFOUTPUT> is not Boolean</H3>
  22.  
  23.     </CFIF>
  24.  
  25.  
  26. </CFIF>
  27.  
  28. <FORM ACTION="isboolean.cfm" METHOD="POST">
  29. <P>Enter an expression, and discover if
  30. it can be evaluated to a Boolean value.
  31.  
  32. <INPUT TYPE="Text" NAME="TheTestValue" VALUE="1">
  33.  
  34. <INPUT TYPE="Submit" VALUE="Is it Boolean?" NAME="">
  35.  
  36.  
  37. </FORM>
  38.  
  39.  
  40.  
  41. </BODY>
  42.  
  43. </HTML>       
  44.